<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/13 0013
 * Time: 下午 4:22
 */
namespace app\common\lib;

use app\common\Helper;

class WxTools{



    public static function getAccessToken(){

        $appid = config('wx.app_id');
        $secret = config('wx.app_secret');
        $url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret=".$secret;
        $result = json_decode(Helper::curlGet($url),true);
        return $result['access_token'];


    }

}